package com.emmmya.harinCheck.exception;

/**
 * 校验异常
 * @author Harin
 * @version 1.0
 * @date 2022-04-29 19:22:49
 */
public class HarinCheckException extends RuntimeException{
    /**
     * 关联的字段名称
     */
    private String fieldName;
    /**
     * 前端的属性name的值
     */
    private Object fieldNameValue;

    public HarinCheckException(String errorMsg) {
        super(errorMsg);
    }

    public HarinCheckException(String errorMsg,String name,Object value) {
        super(errorMsg+"=====name:"+name+",值："+value);
        this.fieldName = name;
        this.fieldNameValue = value;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }
}
